﻿
// **************************************************************************
//    Class Created by Mick Doherty (Dotnetrix) June 2010
//    http://dotnetrix.co.uk/
//
//    ...for GlassUI (an AeroGlass UI Library)
//    http://glassui.codeplex.com/
// **************************************************************************

using System.Diagnostics.CodeAnalysis;
using System.Windows.Forms;

namespace GlassUI
{
    [SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")]
    [SuppressMessage("Microsoft.Design", "CA1039:ListsAreStronglyTyped")]
    public class StackedPanelCollection : Control.ControlCollection
    {
        public StackedPanelCollection(StackedPanelControl owner)
            : base(owner)
        {
        }

        public void Add(StackedPanel value)
        {
            base.Add(value);
        }

        public void AddRange(StackedPanel[] controls)
        {
            base.AddRange(controls);
        }

        public bool Contains(StackedPanel control)
        {
            return base.Contains(control);
        }

        public void CopyTo(StackedPanel[] array, int index)
        {
            base.CopyTo(array, index);
        }

        public new StackedPanel[] Find(string key, bool searchAllChildren)
        {
            return base.Find(key,searchAllChildren) as StackedPanel[];
        }

        public int GetChildIndex(StackedPanel child)
        {
            return base.GetChildIndex(child);
        }

        public virtual int GetChildIndex(StackedPanel child, bool throwException)
        {
            return base.GetChildIndex(child, throwException);
        }

        public int IndexOf(StackedPanel control)
        {
            return base.IndexOf(control);
        }

        public virtual void Remove(StackedPanel value)
        {
            base.Remove(value);
        }

        public virtual void SetChildIndex(StackedPanel child, int newIndex)
        {
            base.SetChildIndex(child, newIndex);
        }

        public new StackedPanel this[int index]
        {
            get
            {
                if (index == -1)
                    return null;
                return base[index] as StackedPanel;
            }
        }

        public new StackedPanel this[string key]
        {
            get
            {
                return base[key] as StackedPanel;
            }
        }
    }
}
